#元组
phone_list = ['13880001111', '13999992222', '150999933331']
password_list = ['123456', '456def', 'aaaaaa']
#定义空列表
result=[]
# 1.遍历手机号
for i in phone_list:
    # 变量对应的密码
    for j in password_list:
        # 账号和密码的全组合
        element = (i,j)
        result.append(element)
print(result)
print(len(result))

#定义函数demo
def demo():
    """测试函数"""
    print("这个是测试函数")

demo()

#定义字典元素的列表
login_data = [
    {"username": "13488888888", "password": "123456"},
    {"username": "", "password": "123456"},
    {"username": "13800000001", "password": ""},
    {"username": "13800000001", "password": "123"}
]
def login(phone, pwd):
    """
    登录判断函数
    :param phone: 手机号
    :param pwd: 密码
    :return: 无
    """
    if phone == "13488888888" and pwd == "123456":
        print("登录成功")
    else:
        print("登录失败")

login("13488888888","123456")

num=1
for i in login_data:
    # 获取账号密码
    phone=i.get("username")
    pwd=i.get("password")
    print(f"第{num}次测试")
    # 调用函数
    login(phone,pwd)
    num+=1

def login(phone):
    """
    模拟登录
    :param phone: 验证手机号
    :return: 返回账号的结果
    """
    # 模拟登录
    if phone == "13488888888":
        return "账号正确"
    else:
        return "账号错误"
# 调用函数断言结果
assert "账号错误"==login("13800000001")
assert "正确" in login("13488888888")

# 1.定义函数
def get_max(num1, num2):
    """获取较大值函数"""
    # 有两个数字：直接通过参数传递
    # 判断大小关系
    if num1 > num2: # num1大于num2 返回num1
    # 返回较大值
        return num1
    else: # num1小于等于num2 返回num2
        return num2
# 2.调用函数
print(get_max(10, 20))